# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an


from PyQt5.QtWidgets import *
import sys


class WIN(QWidget):
    def __init__(self):
        super(WIN, self).__init__()
        self.setWindowTitle("表单布局管理例子")
        self.resize(400,100)

        formlayout = QFormLayout()
        label1 = QLabel("标签 1")
        linEdit1 = QLineEdit()

        label2 = QLabel("标签 2")
        linEdit2 = QLineEdit()

        label3 = QLabel("标签 3")
        linEdit3 = QLineEdit()

        formlayout.addRow(label1,linEdit1)
        formlayout.addRow(label2,linEdit2)
        formlayout.addRow(label3,linEdit3)

        self.setLayout(formlayout)

if __name__ == '__main__':
    app = QApplication(sys.argv)
    win = WIN()
    win.show()
    sys.exit(app.exec_())